{
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# Polynomial Part 2"
      ],
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "import numpy as np\n",
        "import matplotlib.pyplot as plt\n",
        "import pandas as pd\n",
        "\n",
        "import warnings\n",
        "warnings.filterwarnings(\"ignore\")\n",
        "\n",
        "# fix_yahoo_finance is used to fetch data \n",
        "import fix_yahoo_finance as yf\n",
        "yf.pdr_override()"
      ],
      "outputs": [],
      "execution_count": 1,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# input\n",
        "symbol = 'AMD'\n",
        "start = '2014-01-01'\n",
        "end = '2019-01-01'\n",
        "\n",
        "# Read data \n",
        "dataset = yf.download(symbol,start,end)\n",
        "\n",
        "# View Columns\n",
        "dataset.head()"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "[*********************100%***********************]  1 of 1 downloaded\n"
          ]
        },
        {
          "output_type": "execute_result",
          "execution_count": 2,
          "data": {
            "text/plain": [
              "            Open  High   Low  Close  Adj Close    Volume\n",
              "Date                                                    \n",
              "2014-01-02  3.85  3.98  3.84   3.95       3.95  20548400\n",
              "2014-01-03  3.98  4.00  3.88   4.00       4.00  22887200\n",
              "2014-01-06  4.01  4.18  3.99   4.13       4.13  42398300\n",
              "2014-01-07  4.19  4.25  4.11   4.18       4.18  42932100\n",
              "2014-01-08  4.23  4.26  4.14   4.18       4.18  30678700"
            ],
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Open</th>\n",
              "      <th>High</th>\n",
              "      <th>Low</th>\n",
              "      <th>Close</th>\n",
              "      <th>Adj Close</th>\n",
              "      <th>Volume</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Date</th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>2014-01-02</th>\n",
              "      <td>3.85</td>\n",
              "      <td>3.98</td>\n",
              "      <td>3.84</td>\n",
              "      <td>3.95</td>\n",
              "      <td>3.95</td>\n",
              "      <td>20548400</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2014-01-03</th>\n",
              "      <td>3.98</td>\n",
              "      <td>4.00</td>\n",
              "      <td>3.88</td>\n",
              "      <td>4.00</td>\n",
              "      <td>4.00</td>\n",
              "      <td>22887200</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2014-01-06</th>\n",
              "      <td>4.01</td>\n",
              "      <td>4.18</td>\n",
              "      <td>3.99</td>\n",
              "      <td>4.13</td>\n",
              "      <td>4.13</td>\n",
              "      <td>42398300</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2014-01-07</th>\n",
              "      <td>4.19</td>\n",
              "      <td>4.25</td>\n",
              "      <td>4.11</td>\n",
              "      <td>4.18</td>\n",
              "      <td>4.18</td>\n",
              "      <td>42932100</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2014-01-08</th>\n",
              "      <td>4.23</td>\n",
              "      <td>4.26</td>\n",
              "      <td>4.14</td>\n",
              "      <td>4.18</td>\n",
              "      <td>4.18</td>\n",
              "      <td>30678700</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 2,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "dataset['Increase_Decrease'] = np.where(dataset['Volume'].shift(-1) > dataset['Volume'],1,0)\n",
        "dataset['Buy_Sell_on_Open'] = np.where(dataset['Open'].shift(-1) > dataset['Open'],1,0)\n",
        "dataset['Buy_Sell'] = np.where(dataset['Adj Close'].shift(-1) > dataset['Adj Close'],1,0)\n",
        "dataset['Returns'] = dataset['Adj Close'].pct_change()\n",
        "dataset = dataset.dropna()\n",
        "dataset.head()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 3,
          "data": {
            "text/plain": [
              "            Open  High   Low  Close  Adj Close    Volume  Increase_Decrease  \\\n",
              "Date                                                                          \n",
              "2014-01-03  3.98  4.00  3.88   4.00       4.00  22887200                  1   \n",
              "2014-01-06  4.01  4.18  3.99   4.13       4.13  42398300                  1   \n",
              "2014-01-07  4.19  4.25  4.11   4.18       4.18  42932100                  0   \n",
              "2014-01-08  4.23  4.26  4.14   4.18       4.18  30678700                  0   \n",
              "2014-01-09  4.20  4.23  4.05   4.09       4.09  30667600                  0   \n",
              "\n",
              "            Buy_Sell_on_Open  Buy_Sell   Returns  \n",
              "Date                                              \n",
              "2014-01-03                 1         1  0.012658  \n",
              "2014-01-06                 1         1  0.032500  \n",
              "2014-01-07                 1         0  0.012107  \n",
              "2014-01-08                 0         0  0.000000  \n",
              "2014-01-09                 0         1 -0.021531  "
            ],
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Open</th>\n",
              "      <th>High</th>\n",
              "      <th>Low</th>\n",
              "      <th>Close</th>\n",
              "      <th>Adj Close</th>\n",
              "      <th>Volume</th>\n",
              "      <th>Increase_Decrease</th>\n",
              "      <th>Buy_Sell_on_Open</th>\n",
              "      <th>Buy_Sell</th>\n",
              "      <th>Returns</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Date</th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>2014-01-03</th>\n",
              "      <td>3.98</td>\n",
              "      <td>4.00</td>\n",
              "      <td>3.88</td>\n",
              "      <td>4.00</td>\n",
              "      <td>4.00</td>\n",
              "      <td>22887200</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>0.012658</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2014-01-06</th>\n",
              "      <td>4.01</td>\n",
              "      <td>4.18</td>\n",
              "      <td>3.99</td>\n",
              "      <td>4.13</td>\n",
              "      <td>4.13</td>\n",
              "      <td>42398300</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>1</td>\n",
              "      <td>0.032500</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2014-01-07</th>\n",
              "      <td>4.19</td>\n",
              "      <td>4.25</td>\n",
              "      <td>4.11</td>\n",
              "      <td>4.18</td>\n",
              "      <td>4.18</td>\n",
              "      <td>42932100</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>0</td>\n",
              "      <td>0.012107</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2014-01-08</th>\n",
              "      <td>4.23</td>\n",
              "      <td>4.26</td>\n",
              "      <td>4.14</td>\n",
              "      <td>4.18</td>\n",
              "      <td>4.18</td>\n",
              "      <td>30678700</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>0.000000</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2014-01-09</th>\n",
              "      <td>4.20</td>\n",
              "      <td>4.23</td>\n",
              "      <td>4.05</td>\n",
              "      <td>4.09</td>\n",
              "      <td>4.09</td>\n",
              "      <td>30667600</td>\n",
              "      <td>0</td>\n",
              "      <td>0</td>\n",
              "      <td>1</td>\n",
              "      <td>-0.021531</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 3,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "dataset.shape"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 4,
          "data": {
            "text/plain": [
              "(1257, 10)"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 4,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "X = dataset['Open'].values\n",
        "y = dataset['Adj Close'].values"
      ],
      "outputs": [],
      "execution_count": 13,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.model_selection import train_test_split\n",
        "\n",
        "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25)"
      ],
      "outputs": [],
      "execution_count": 14,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "plt.plot(X_train, y_train, 'bo')\n",
        "plt.plot(X_test, np.zeros_like(X_test), 'r+')"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 15,
          "data": {
            "text/plain": [
              "[<matplotlib.lines.Line2D at 0x18ba7192080>]"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ],
            "image/png": [
              "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAHUpJREFUeJzt3X+MHGd5B/Dvc3d27Dtbsr13CSaJ9yigiqSqQnOKghKB2wQo/icgQUV0NmcbyYmPSIfoH1CMFBPJalTxy1Ib/0BxfPi2QNSEJgLUEqJYIRIKnNP8dmmgunOTWPH5TBQfhsQ/nv7xzmjn5mZ2ZmfemZ2Z/X6k1e7Ozs68uxs/9+aZ531fUVUQEVH59XS6AUREZAcDOhFRRTCgExFVBAM6EVFFMKATEVUEAzoRUUUwoBMRVQQDOhFRRTCgExFVRF+eJxscHNTh4eE8T0lEVHrHjh07rapDUfvlGtCHh4cxPT2d5ymJiEpPRGbj7MeUCxFRRTCgExFVBAM6EVFFMKATEVUEAzoRUUUwoBMRhWg0gOFhoKfH3DcanW5RawzoREQebhAXAbZsAWZnAVVzv307MDjYXoDP849CrnXoRERF1mgAO3YA586Z5/4VOt95B5ifN49nZ82+ADA6Gu94cd6TBnvoRFRp7fSQd+1qBt84zp0DJibCjx90vHPnzPYssIdORJXVbg/5xIn2zzE/H95rDztekvPEwR46EVVWuz3kDRvSn9M9fqNheu1ZnScIAzoRVVa7PeQ9e4D+/sXbRNo/r9tTv3hx6Wv9/eY8WWBAJ6LKCusJh20fHQUOHgTqdRPI63XgyBFgaio40K9aFXyc3t7gXHxvrzl+FhdEAQZ0IqqwoB63v4fsv2gKADMzwKVL5n50NDzQ798ffPygnjlgjplVMAcY0ImowoICsbeH7F409daa79ixuFLFDfhbtpjnR460DvTu8yBZ5c5dov5CywyNjIwo50MnoqIYHjZB3K9eN0HbXyUDmB54VNok6fvCi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Due1RlVfd+5PAfgRzH8cZfSGkxt1c6SnOtyetqjqG84/0ksAvouC/w5O7vYhAA1VfdjZXJrfIKj9ZfsNAEBV3wRwFMCNANaIiDvlSeliUZQ8AnqpF5MWkQHnohBEZADAxwC82PpdhfUogDHn8RiARzrYlra5gdDxKRT4d3Auyt0P4LiqfsvzUil+g7D2l+U3EJEhEVnjPF4J4FaY6wBPAPi0s1thv/+kchlY5JQ2fQfNxaT3ZH5SS0Tkz2B65YCZzOxfy9B+Efk+gI0ws8u9AeBuAP8O4EEAGwCcAPAZVS3khceQ9m+E+V99BTAD4A43H100InIzgF8AeAHAJWfzV2Hy0IX/DVq0/3aU4DcQkb+EuejZC9NxfVBV73H+Pf8AwDoA/wVgs6q+HX6kcuFIUSKiiuBIUSKiimBAJyKqCAZ0IqKKYEAnIqoIBnQioopgQCciqggGdCKiimBAJyKqiP8HC8APqPPAE4IAAAAASUVORK5CYII=\n"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 15,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.preprocessing import PolynomialFeatures\n",
        "from sklearn.linear_model import LinearRegression\n",
        "\n",
        "model = LinearRegression()\n",
        "model.fit(X_train.reshape(-1, 1), y_train)\n",
        "preds = model.predict(X_test.reshape(-1, 1))\n",
        "preds[:3]"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 16,
          "data": {
            "text/plain": [
              "array([ 13.72679402,   3.65117701,  10.97345709])"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 16,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# fit-predict-evaluate a 1D polynomial (a line)\n",
        "model_one = np.poly1d(np.polyfit(X_train, y_train,\n",
        "1))\n",
        "preds_one = model_one(X_test)\n",
        "print(preds_one[:3])"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "[ 13.72679402   3.65117701  10.97345709]\n"
          ]
        }
      ],
      "execution_count": 17,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Polynomial"
      ],
      "metadata": {}
    },
    {
      "cell_type": "code",
      "source": [
        "from sklearn.metrics import mean_squared_error\n",
        "\n",
        "# the predictions come back the same\n",
        "print(\"all close?\", np.allclose(preds, preds_one))\n",
        "# and we can still use sklearn to evaluate it\n",
        "mse = mean_squared_error\n",
        "print(\"RMSE:\", np.sqrt(mse(y_test, preds_one)))"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "all close? True\n",
            "RMSE: 0.30372614873\n"
          ]
        }
      ],
      "execution_count": 22,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# fit-predict-evaluate a 2D polynomial (a parabola)\n",
        "model_two = np.poly1d(np.polyfit(X_train, y_train,\n",
        "2))\n",
        "preds_two = model_two(X_test)\n",
        "print(\"RMSE:\", np.sqrt(mse(y_test, preds_two)))"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "RMSE: 0.303129198176\n"
          ]
        }
      ],
      "execution_count": 23,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "model_three = np.poly1d(np.polyfit(X_train, y_train, 9))\n",
        "preds_three = model_three(X_test)\n",
        "print(\"RMSE:\", np.sqrt(mse(y_test, preds_three)))"
      ],
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "RMSE: 0.311489430887\n"
          ]
        }
      ],
      "execution_count": 24,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "fig, axes = plt.subplots(1, 2, figsize=(6, 3),sharey=True)\n",
        "labels = ['line', 'parabola', 'nonic']\n",
        "models = [model_one, model_two, model_three]\n",
        "train = (X_train, y_train)\n",
        "test = (X_test, y_test)\n",
        "for ax, (ftr, tgt) in zip(axes, [train, test]):\n",
        "    ax.plot(ftr, tgt, 'k+')\n",
        "    for m, lbl in zip(models, labels):\n",
        "        ftr = sorted(ftr)\n",
        "        ax.plot(ftr, m(ftr), '-', label=lbl)\n",
        "axes[1].set_ylim(-20, 200)\n",
        "axes[0].set_title(\"Train\")\n",
        "axes[1].set_title(\"Test\");\n",
        "axes[0].legend(loc='upper center');"
      ],
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 432x216 with 2 Axes>"
            ],
            "image/png": [
              "iVBORw0KGgoAAAANSUhEUgAAAXoAAADSCAYAAABEmAunAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xt01PWd//HneyY3CJAEyA0IBAXlDiJSPFqDtVrtzdpqrb+txbZb+9uqXU/7c0u7KqF1zyqnVnvZ9vfT2gPrdlnbulvtHrtbdQ1st1oFCYhc5BYgkBBCEkIICZmZz++PmYmTYULumcmX1+OcnJn5zndm3olvX3y+n+9lzDmHiIh4ly/ZBYiIyNBS0IuIeJyCXkTE4xT0IiIep6AXEfE4Bb2IiMcp6D3CzPxm1mJmU5Ndi4ikFgV9kkRCOfoTMrMzMY//oq/v55wLOufGOOcODUW9In012D0e875vmNnnB7NWr0tLdgEXKufcmOh9M6sC/tI590p365tZmnMuMBy1iQyGvva4DB2N6FOUmT1iZs+Z2XozOwV83syujIxmmsysxsx+ZGbpkfXTzMyZWWnk8T9Fnv+9mZ0ys9fNbHoSfyWRLiLTjQ+Z2X4zqzezX5pZbuS5bDP7FzNriPT7n80sz8weB64Afh7ZMng8ub/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l6EREZOqkyohcRkSGS9KA3sxvNbLeZ7TWzlcmuJ56Z/cLM6sxse8yy8Wb2spntidzmJbPGKDMrMbPXzGynmb1rZn8dWZ6q9WaZ2ZtmtjVS7+rI8ulm9udIvc9FvndYBtlI6u1YI63PIfm9ntSgNzM/8A/ATcAc4A4zm5PMmhJYC9wYt2wl8KpzbibwauRxKggA33TOzQaWAfdE/p6pWm878CHn3EJgEXCjmS0DHgOeiNTbCHw5iTV62VpGTm/HGml9Dsnu9fhvnx/OH+BK4D9jHn8b+HYya+qmzlJge8zj3UBx5H4xsDvZNXZT9wvA9SOhXmA08DbwAcInkKQl6hH9DPrffUT2dtzvMGL6PFLbsPd6sqduJgOHYx5XR5alukLnXA1A5LYgyfWcw8xKgcuAP5PC9ZqZ38wqgTrgZWAf0OScC0RWGSk94RUp2yuJjJQ+h+T2erKD3hIs02FAA2RmY4Dngfudc83Jrud8nHNB59wiYAqwFJidaLXhrUpGgpHU55DcXk920FcDJTGPpwBHk1RLXxwzs2KAyG1dkuvpZGbphJv/l865f40sTtl6o5xzTUAF4TnXXDNLizw1UnrCK1K+V2Dk9jkkp9eTHfRvATMje54zgM8BLya5pt54EVgRub+C8Bxh0pmZAc8AO51zP4h5KlXrzTez3Mj9UcCHgZ3Aa8CtkdVSpt4LREr2SqyR1ueQAr2eAjsmPgq8R3i+6m+TXU+C+tYDNUAH4S2QLwMTCO/V3xO5HZ/sOiO1Xk14028bUBn5+WgK17sA2BKpdzvwcGT5RcCbwF7g10Bmsmv14s9I6u24ukdUn0dqTmqv68xYERGPS/bUjYiIDDEFvYiIxynoRUQ8TkEvIuJxCnoREY9T0IuIeJyCXkTE4xT0IiIe9/8B1URQrKFwZ+QAAAAASUVORK5CYII=\n"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 25,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "results = []\n",
        "for complexity in [1, 2, 3, 4, 5, 6,7,8, 9]:\n",
        "    model = np.poly1d(np.polyfit(X_train, y_train, complexity))\n",
        "    train_error = np.sqrt(mse(y_train, model(X_train)))\n",
        "    test_error = np.sqrt(mse(y_test,model(X_test)))\n",
        "    results.append((complexity, train_error, test_error))\n",
        "columns = [\"Complexity\", \"Train Error\", \"Test Error\"]\n",
        "results_df = pd.DataFrame.from_records(results, columns=columns,index=\"Complexity\")\n",
        "results_df    "
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 35,
          "data": {
            "text/plain": [
              "            Train Error  Test Error\n",
              "Complexity                         \n",
              "1              0.391407    0.303726\n",
              "2              0.390389    0.303129\n",
              "3              0.389416    0.302708\n",
              "4              0.388973    0.301861\n",
              "5              0.388792    0.301053\n",
              "6              0.386892    0.304473\n",
              "7              0.380734    0.314353\n",
              "8              0.379176    0.312722\n",
              "9              0.378642    0.311489"
            ],
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Train Error</th>\n",
              "      <th>Test Error</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>Complexity</th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>0.391407</td>\n",
              "      <td>0.303726</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>0.390389</td>\n",
              "      <td>0.303129</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>0.389416</td>\n",
              "      <td>0.302708</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>0.388973</td>\n",
              "      <td>0.301861</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>0.388792</td>\n",
              "      <td>0.301053</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>0.386892</td>\n",
              "      <td>0.304473</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>0.380734</td>\n",
              "      <td>0.314353</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>0.379176</td>\n",
              "      <td>0.312722</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>0.378642</td>\n",
              "      <td>0.311489</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 35,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    },
    {
      "cell_type": "code",
      "source": [
        "results_df.plot()"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 36,
          "data": {
            "text/plain": [
              "<matplotlib.axes._subplots.AxesSubplot at 0x18ba730acf8>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ],
            "image/png": [
              "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEKCAYAAAD+XoUoAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3XuYXHWd5/H3ty59TedCbg2EbCBGIAkSYoNykXAJGEABHVwRmHVQN8MOjIyso+hmHhDdmejMgiiMyMagjkqGEXkexh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xh6pWAQl8OO4W+jHTnAx3ufl/nBndfAzxrZv8YzjH+mpl9GrreqT9lZg+Z2R/NbLGZXRtee+A1M5setvuxmd1nZs+E7fpM+Rx+U3epma0KJzi7Itx+i5ktDZdPCWuoMrO/MLN7zOwsgjln/jGcT366mb2U9bwzzGwkzEckI1DJfCNXZIhmE1zToLdPAnOAU4EJwCozezp87FSC6Wh3EnxrdYm7n2HBBXH+Gui8CMU0YB4wHXjCzN7X6zX+F8HUEZ8Lp7xYaWYrCGYOfdLMPhG2+Ut3bw2/0Yu7P29mjwK/dvdfApjZHjObE3ZY1wM/PpRfikh/9E5fjlTnAA+GM41uI5hj/PTwsVXhdRHagDeAzulyXyMI+k4PuXsmvBjFZuCkXq9xMXBrOB3Hk0AFMNXdM8BfAP8CPOXuz+VR7xLg+nDajE8DvxjMDyuSL73Tl5FuHXBVju12kH3aspYzWesZev6f6D1HSe91A/7M3V/P8RozCK4Ed8xB6sj2MHAb8Dtgtbs35bmfyKDonb6MdL8Dys3sv3duMLPTgV3Ap8MLyUwkuKLUykE+96fMLBaO858A9A735cBfhx8mY2anhfdjgLvD1xxvZrk6pX1ATeeKux8In+8HwAODrFMkbwp9GdE8mDHwE8BF4Smb64DbCYZHXiW4oMTvgK+EUw8PxusEw0KPATeEwZztmwSXoXzVzNaG6wB3Af/s7n8EPg8s7pz6Nssy4G/DD4Cnh9t+TniFrkHWKZI3zbIpkoOZ/ZisD1oP02t+GRjj7n93uF5Tokdj+iIlwMweIThL6IJi1yJHNr3TFxGJEI3pi4hEiEJfRCRCFPoiIhGi0BcRiRCFvohIhCj0RUQi5P8DDsSHYGyPfEUAAAAASUVORK5CYII=\n"
            ]
          },
          "metadata": {}
        }
      ],
      "execution_count": 36,
      "metadata": {
        "collapsed": false,
        "outputHidden": false,
        "inputHidden": false
      }
    }
  ],
  "metadata": {
    "kernel_info": {
      "name": "python3"
    },
    "language_info": {
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.5.5",
      "name": "python",
      "mimetype": "text/x-python",
      "file_extension": ".py",
      "codemirror_mode": {
        "version": 3,
        "name": "ipython"
      }
    },
    "kernelspec": {
      "name": "python3",
      "language": "python",
      "display_name": "Python 3"
    },
    "nteract": {
      "version": "0.15.0"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}